package com.dabai.iot.core.vo;

import com.dabai.common.tenant.core.TenantEntity;
import com.dabai.iot.core.tsl.specs.TslDataSpec;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 物模型属性表 视图实体类
 *
 * @author kev1n
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ThingModelItemVO extends TenantEntity {

    /**
     * 主键Id
     */
    @Schema(description = "主键Id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 租户Id
     */
    @Schema(description = "租户Id")
    private String tenantId;

    /**
     * 物模型模块主键id
     */
    @Schema(description = "物模型模块主键id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long blockId;

    /**
     * 物模型模块标识符
     */
    @Schema(description = "物模型模块标识符")
    private String blockIdentifier;

    /**
     * 中文名称
     */
    @Schema(description = "中文名称")
    private String name;

    /**
     * 标识符
     */
    @Schema(description = "标识符")
    private String identifier;

    /**
     * 功能类型
     */
    @Schema(description = "功能类型")
    private String functionType;

    /**
     * 数据类型
     */
    @Schema(description = "数据类型")
    private String dataType;

    /**
     * 访问模式
     */
    @Schema(description = "访问模式")
    private String method;

    /**
     * 排序
     */
    @Schema(description = "排序")
    private Integer sort;

    /**
     * 物模型属性描述
     */
    private TslDataSpec dataSpecs;

}
